package com.ssish.saas.eccs.mapper;

import com.ssish.saas.eccs.model.RsvamtTracking;
import com.ssish.saas.eccs.model.RsvamtTrackingExample;
import com.ssish.saas.eccs.model.RsvamtTrackingKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface RsvamtTrackingMapper {
    int countByExample(RsvamtTrackingExample example);

    int deleteByExample(RsvamtTrackingExample example);

    @Delete({
        "delete from RSVAMT_TRACKING",
        "where CLAIMS_ID = #{claimsId,jdbcType=DECIMAL}",
          "and TRANSACTION_DATE = #{transactionDate,jdbcType=TIMESTAMP}",
          "and CLAIMS_STATUS = #{claimsStatus,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(RsvamtTrackingKey key);

    @Insert({
        "insert into RSVAMT_TRACKING (CLAIMS_ID, TRANSACTION_DATE, ",
        "CLAIMS_STATUS, CLAIM_NO, ",
        "CARD_NO, RESERVED_AMT, ",
        "PAYOR_REMARKS, APPROVED_DATE, ",
        "APPROVED_BY, PRINT_CONFIRM, ",
        "PHYSICIAN_ID, PRINTED_DATE, ",
        "PRINTED_BY, ATTENTION_TO, ",
        "FAX_NO, FAX_DATE, ",
        "FAX_STATUS, PAYOR_CODE, ",
        "NEW_CLAIMS_STATUS, ACTION_SEQNO, ",
        "ACTION_BY, ACTION_DATE, ",
        "ACTION_REM, UPLOAD_DATE, ",
        "FAX_LOG, RESERVED_DAY, ",
        "JOURNAL_NO, DOCRCV_DATE, ",
        "NOTIFY_DATE, DEFERCD, ",
        "VERIFIED_DATE, VERIFIED_BY, ",
        "VERIFIED_CODE, VERIFIED_REM, ",
        "VERIFIED_LIABILITY, PRIVATE_REMARKS, ",
        "INCOMPLETE_FORM, INCOMPLETE_REPORT, ",
        "REMINDER, DOCRCV_REPORT, ",
        "ICD_CODE, CPT_CODE, ",
        "DOCFAX_DATE, LAST_DOCRCV_DATE, ",
        "LAST_DOCFAX_DATE, CANCELLED_DATE, ",
        "CANCELLED_BY, PROVIDER_NAME, ",
        "PROVIDER_ADDRESS, PAYMENT_REMARKS, ",
        "FIRST_PRINT_DATE, FIRST_PRINT_BY, ",
        "PROVIDER_REFNO, COMPUTETAT, ",
        "CANCELLED_CODE, CANCELLED_REM, ",
        "PAYOR_REMARKS_CATG)",
        "values (#{claimsId,jdbcType=DECIMAL}, #{transactionDate,jdbcType=TIMESTAMP}, ",
        "#{claimsStatus,jdbcType=CHAR}, #{claimNo,jdbcType=CHAR}, ",
        "#{cardNo,jdbcType=DECIMAL}, #{reservedAmt,jdbcType=DECIMAL}, ",
        "#{payorRemarks,jdbcType=VARCHAR}, #{approvedDate,jdbcType=TIMESTAMP}, ",
        "#{approvedBy,jdbcType=VARCHAR}, #{printConfirm,jdbcType=CHAR}, ",
        "#{physicianId,jdbcType=VARCHAR}, #{printedDate,jdbcType=TIMESTAMP}, ",
        "#{printedBy,jdbcType=VARCHAR}, #{attentionTo,jdbcType=VARCHAR}, ",
        "#{faxNo,jdbcType=VARCHAR}, #{faxDate,jdbcType=TIMESTAMP}, ",
        "#{faxStatus,jdbcType=VARCHAR}, #{payorCode,jdbcType=CHAR}, ",
        "#{newClaimsStatus,jdbcType=CHAR}, #{actionSeqno,jdbcType=DECIMAL}, ",
        "#{actionBy,jdbcType=VARCHAR}, #{actionDate,jdbcType=TIMESTAMP}, ",
        "#{actionRem,jdbcType=VARCHAR}, #{uploadDate,jdbcType=TIMESTAMP}, ",
        "#{faxLog,jdbcType=VARCHAR}, #{reservedDay,jdbcType=DECIMAL}, ",
        "#{journalNo,jdbcType=DECIMAL}, #{docrcvDate,jdbcType=TIMESTAMP}, ",
        "#{notifyDate,jdbcType=TIMESTAMP}, #{defercd,jdbcType=VARCHAR}, ",
        "#{verifiedDate,jdbcType=TIMESTAMP}, #{verifiedBy,jdbcType=VARCHAR}, ",
        "#{verifiedCode,jdbcType=VARCHAR}, #{verifiedRem,jdbcType=VARCHAR}, ",
        "#{verifiedLiability,jdbcType=DECIMAL}, #{privateRemarks,jdbcType=VARCHAR}, ",
        "#{incompleteForm,jdbcType=VARCHAR}, #{incompleteReport,jdbcType=VARCHAR}, ",
        "#{reminder,jdbcType=DECIMAL}, #{docrcvReport,jdbcType=VARCHAR}, ",
        "#{icdCode,jdbcType=VARCHAR}, #{cptCode,jdbcType=VARCHAR}, ",
        "#{docfaxDate,jdbcType=TIMESTAMP}, #{lastDocrcvDate,jdbcType=TIMESTAMP}, ",
        "#{lastDocfaxDate,jdbcType=TIMESTAMP}, #{cancelledDate,jdbcType=TIMESTAMP}, ",
        "#{cancelledBy,jdbcType=VARCHAR}, #{providerName,jdbcType=VARCHAR}, ",
        "#{providerAddress,jdbcType=VARCHAR}, #{paymentRemarks,jdbcType=VARCHAR}, ",
        "#{firstPrintDate,jdbcType=TIMESTAMP}, #{firstPrintBy,jdbcType=VARCHAR}, ",
        "#{providerRefno,jdbcType=VARCHAR}, #{computetat,jdbcType=CHAR}, ",
        "#{cancelledCode,jdbcType=VARCHAR}, #{cancelledRem,jdbcType=VARCHAR}, ",
        "#{payorRemarksCatg,jdbcType=VARCHAR})"
    })
    int insert(RsvamtTracking record);

    int insertSelective(RsvamtTracking record);

    List<RsvamtTracking> selectByExample(RsvamtTrackingExample example);

    @Select({
        "select",
        "CLAIMS_ID, TRANSACTION_DATE, CLAIMS_STATUS, CLAIM_NO, CARD_NO, RESERVED_AMT, ",
        "PAYOR_REMARKS, APPROVED_DATE, APPROVED_BY, PRINT_CONFIRM, PHYSICIAN_ID, PRINTED_DATE, ",
        "PRINTED_BY, ATTENTION_TO, FAX_NO, FAX_DATE, FAX_STATUS, PAYOR_CODE, NEW_CLAIMS_STATUS, ",
        "ACTION_SEQNO, ACTION_BY, ACTION_DATE, ACTION_REM, UPLOAD_DATE, FAX_LOG, RESERVED_DAY, ",
        "JOURNAL_NO, DOCRCV_DATE, NOTIFY_DATE, DEFERCD, VERIFIED_DATE, VERIFIED_BY, VERIFIED_CODE, ",
        "VERIFIED_REM, VERIFIED_LIABILITY, PRIVATE_REMARKS, INCOMPLETE_FORM, INCOMPLETE_REPORT, ",
        "REMINDER, DOCRCV_REPORT, ICD_CODE, CPT_CODE, DOCFAX_DATE, LAST_DOCRCV_DATE, ",
        "LAST_DOCFAX_DATE, CANCELLED_DATE, CANCELLED_BY, PROVIDER_NAME, PROVIDER_ADDRESS, ",
        "PAYMENT_REMARKS, FIRST_PRINT_DATE, FIRST_PRINT_BY, PROVIDER_REFNO, COMPUTETAT, ",
        "CANCELLED_CODE, CANCELLED_REM, PAYOR_REMARKS_CATG",
        "from RSVAMT_TRACKING",
        "where CLAIMS_ID = #{claimsId,jdbcType=DECIMAL}",
          "and TRANSACTION_DATE = #{transactionDate,jdbcType=TIMESTAMP}",
          "and CLAIMS_STATUS = #{claimsStatus,jdbcType=CHAR}"
    })
    @ResultMap("BaseResultMap")
    RsvamtTracking selectByPrimaryKey(RsvamtTrackingKey key);

    int updateByExampleSelective(@Param("record") RsvamtTracking record, @Param("example") RsvamtTrackingExample example);

    int updateByExample(@Param("record") RsvamtTracking record, @Param("example") RsvamtTrackingExample example);

    int updateByPrimaryKeySelective(RsvamtTracking record);

    @Update({
        "update RSVAMT_TRACKING",
        "set CLAIM_NO = #{claimNo,jdbcType=CHAR},",
          "CARD_NO = #{cardNo,jdbcType=DECIMAL},",
          "RESERVED_AMT = #{reservedAmt,jdbcType=DECIMAL},",
          "PAYOR_REMARKS = #{payorRemarks,jdbcType=VARCHAR},",
          "APPROVED_DATE = #{approvedDate,jdbcType=TIMESTAMP},",
          "APPROVED_BY = #{approvedBy,jdbcType=VARCHAR},",
          "PRINT_CONFIRM = #{printConfirm,jdbcType=CHAR},",
          "PHYSICIAN_ID = #{physicianId,jdbcType=VARCHAR},",
          "PRINTED_DATE = #{printedDate,jdbcType=TIMESTAMP},",
          "PRINTED_BY = #{printedBy,jdbcType=VARCHAR},",
          "ATTENTION_TO = #{attentionTo,jdbcType=VARCHAR},",
          "FAX_NO = #{faxNo,jdbcType=VARCHAR},",
          "FAX_DATE = #{faxDate,jdbcType=TIMESTAMP},",
          "FAX_STATUS = #{faxStatus,jdbcType=VARCHAR},",
          "PAYOR_CODE = #{payorCode,jdbcType=CHAR},",
          "NEW_CLAIMS_STATUS = #{newClaimsStatus,jdbcType=CHAR},",
          "ACTION_SEQNO = #{actionSeqno,jdbcType=DECIMAL},",
          "ACTION_BY = #{actionBy,jdbcType=VARCHAR},",
          "ACTION_DATE = #{actionDate,jdbcType=TIMESTAMP},",
          "ACTION_REM = #{actionRem,jdbcType=VARCHAR},",
          "UPLOAD_DATE = #{uploadDate,jdbcType=TIMESTAMP},",
          "FAX_LOG = #{faxLog,jdbcType=VARCHAR},",
          "RESERVED_DAY = #{reservedDay,jdbcType=DECIMAL},",
          "JOURNAL_NO = #{journalNo,jdbcType=DECIMAL},",
          "DOCRCV_DATE = #{docrcvDate,jdbcType=TIMESTAMP},",
          "NOTIFY_DATE = #{notifyDate,jdbcType=TIMESTAMP},",
          "DEFERCD = #{defercd,jdbcType=VARCHAR},",
          "VERIFIED_DATE = #{verifiedDate,jdbcType=TIMESTAMP},",
          "VERIFIED_BY = #{verifiedBy,jdbcType=VARCHAR},",
          "VERIFIED_CODE = #{verifiedCode,jdbcType=VARCHAR},",
          "VERIFIED_REM = #{verifiedRem,jdbcType=VARCHAR},",
          "VERIFIED_LIABILITY = #{verifiedLiability,jdbcType=DECIMAL},",
          "PRIVATE_REMARKS = #{privateRemarks,jdbcType=VARCHAR},",
          "INCOMPLETE_FORM = #{incompleteForm,jdbcType=VARCHAR},",
          "INCOMPLETE_REPORT = #{incompleteReport,jdbcType=VARCHAR},",
          "REMINDER = #{reminder,jdbcType=DECIMAL},",
          "DOCRCV_REPORT = #{docrcvReport,jdbcType=VARCHAR},",
          "ICD_CODE = #{icdCode,jdbcType=VARCHAR},",
          "CPT_CODE = #{cptCode,jdbcType=VARCHAR},",
          "DOCFAX_DATE = #{docfaxDate,jdbcType=TIMESTAMP},",
          "LAST_DOCRCV_DATE = #{lastDocrcvDate,jdbcType=TIMESTAMP},",
          "LAST_DOCFAX_DATE = #{lastDocfaxDate,jdbcType=TIMESTAMP},",
          "CANCELLED_DATE = #{cancelledDate,jdbcType=TIMESTAMP},",
          "CANCELLED_BY = #{cancelledBy,jdbcType=VARCHAR},",
          "PROVIDER_NAME = #{providerName,jdbcType=VARCHAR},",
          "PROVIDER_ADDRESS = #{providerAddress,jdbcType=VARCHAR},",
          "PAYMENT_REMARKS = #{paymentRemarks,jdbcType=VARCHAR},",
          "FIRST_PRINT_DATE = #{firstPrintDate,jdbcType=TIMESTAMP},",
          "FIRST_PRINT_BY = #{firstPrintBy,jdbcType=VARCHAR},",
          "PROVIDER_REFNO = #{providerRefno,jdbcType=VARCHAR},",
          "COMPUTETAT = #{computetat,jdbcType=CHAR},",
          "CANCELLED_CODE = #{cancelledCode,jdbcType=VARCHAR},",
          "CANCELLED_REM = #{cancelledRem,jdbcType=VARCHAR},",
          "PAYOR_REMARKS_CATG = #{payorRemarksCatg,jdbcType=VARCHAR}",
        "where CLAIMS_ID = #{claimsId,jdbcType=DECIMAL}",
          "and TRANSACTION_DATE = #{transactionDate,jdbcType=TIMESTAMP}",
          "and CLAIMS_STATUS = #{claimsStatus,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(RsvamtTracking record);
}